﻿using ExcelProject.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ExcelProject.Core.Inter
{
    public interface IExcelService
    {
         /// <summary>
         /// 设置Sheet基本信息
         /// </summary>
         /// <param name="path">文件路径</param>
         /// <param name="sheeName">Shee名称</param>
         /// <param name="tableHeaderX">X轴的区间</param>
         /// <param name="tableHeaderY">T轴的区间</param>
         /// <returns></returns>
        ExcelConfig ReadSheet(string path, string sheetName, List<int> tableHeaderX, List<int> tableHeaderY);

        /// <summary>
        /// 读取指定Sheet的数据
        /// </summary>
        /// <typeparam name="T">模型类型</typeparam>
        /// <param name="config">基本信息</param>
        /// <param name="t">对象，直接New一个新的就行</param>
        /// <returns></returns>
        List<T> GetSheetData<T>(ExcelConfig config,T t);

    }
}
